WebGL Textures by Butler A

WebGL Textures by Butler A

Author:Butler, A.
Language: eng
Format: epub
Publisher: Seven Thunder Software
Published: 2015-06-21T16:00:00+00:00


Maze Game's tapLeft() Method

tapLeft() activates when the player taps the colored strip which displays along the left side of the maze.

tapLeft() finds the index within the maze array, which corresponds to one tile directly to the left of the player's current location. If the player's on farthest left row, they can't move any farther to the left. In that case glMaze.idx % 16 equals zero. Call method setWrong() and return.

Otherwise check to see if the tile to the left of the player's tile, is on the path. The following line obtains the index of the tile to the left of the current tile.

idx = glMaze.idx - 1;

Check the maze to determine if glMaze.aMaze[idx] ! = 0. If the tile to the left of the current tile is on the path, then call setRight(). Pass the index of the tile to the left of the current tile to method setRight(). See the tapLeft() method.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.